package com.bsc.rtc.lib.libraries.ParcelableEntity;

import android.os.Parcel;
import android.os.Parcelable;
public class ParcelableEntity implements Parcelable{
    public String name;
    private int age;


    protected ParcelableEntity(Parcel in) {
        name = in.readString();
        age = in.readInt();
    }

    public static final Creator<ParcelableEntity> CREATOR = new Creator<ParcelableEntity>() {
        @Override
        public ParcelableEntity createFromParcel(Parcel in) {
            return new ParcelableEntity(in);
        }

        @Override
        public ParcelableEntity[] newArray(int size) {
            return new ParcelableEntity[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
        dest.writeInt(age);
    }
}
